package com.zmn.oms.model.entity.log;

import com.alibaba.fastjson.annotation.JSONField;
import com.zmn.oms.manager.utils.MongodbConsts;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 类描述：委托单同步日志
 *
 * @author LiangHailong
 * @date 2019/12/30 17:58
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = MongodbConsts.OMS_ORDER_QUOTATION_LOG)
public class OrderQuotationLog implements Serializable {

    /**
     * 操作类型
     */
    private Integer type;

    /**
     * 操作人员类型
     */
    private Integer operatorType;

    /**
     * 订单Id
     */
    private Long orderId;

    /**
     * 工单Id
     */
    private Long workId;

    /**
     * 启动时间
     */
    private String startTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * userId
     * @see com.zmn.consts.GlobalConsts#OPERATE_USER_TYPE_USER  为用户id
     *                                  OPERATE_USER_TYPE_MASTER 为师傅id
     */
    private Long userId;


    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
